/* Gallery styles and site-wide accents */
.work-gallery {
  padding: 60px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.02));
}

.work-gallery .container { max-width: 1200px; margin: 0 auto; }
.gallery-title {
  color: white;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 22px;
  letter-spacing: 0.6px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(.2,.9,.2,1), box-shadow 0.35s;
  will-change: transform;
  border: 1px solid rgba(255,255,255,0.04);
  background: #0b0b0b;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item .item-overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.5);
  color: white;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s;
}

/* active (hover) state */
.gallery-item.active {
  transform: scale(1.08);
  z-index: 10;
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}

.gallery-item.active img {
  transform: scale(1.06) rotate(0.01deg);
}

.gallery-item.shift-left {
  transform: translateX(-8px) scale(0.98);
}

.gallery-item.shift-right {
  transform: translateX(8px) scale(0.98);
}

/* Slightly dim non-active items */
.gallery.has-active .gallery-item:not(.active) { opacity: 0.92; }

/* Responsive tweaks */
@media (max-width: 900px) {
  .gallery { gap: 12px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item { border-radius: 10px; }
  .gallery-title { font-size: 1.4rem; }
}

/* Accessibility focus state */
.gallery-item:focus { outline: 3px solid rgba(255,255,255,0.12); }
